<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/jsp/common/taglibs.jspf" %>

<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>用户管理</title>
		<link rel="stylesheet" href="${ctx}/static/css/index/index.css">
		<%@include file="/WEB-INF/jsp/common/admin/import-css.jspf"%>
		<%@include file="/WEB-INF/jsp/common/admin/import-js.jspf"%>
		
		<script type="text/javascript">
		$(function(){
			$("#dataTable").DataTable({
				"bProcessing": true,
				"bServerSide": true,
				"sPaginationType" : "full_numbers",
				"sServerMethod": "POST",
				"sAjaxSource": "${ctx}/admin/sys/user/datagrid",
				"aoColumns": [
					{"data": "id"},
					{"data": "username"},
					{"data": "password"},
					{"data": "salt"},
					{"data": "mobile"},
					{"data": "email"},
					{"data": "status"},
					{"data": "createDate"}
				 ],
	             "oLanguage": {
	                    "sProcessing": "正在加载中......",
	                    "sLengthMenu": "每页显示 _MENU_ 条记录",
	                    "sZeroRecords": "对不起，查询不到相关数据！",
	                    "sEmptyTable": "表中无数据存在！",
	                    "sInfo": "当前显示 _START_ 到 _END_ 条，共 _TOTAL_ 条记录",
	                    "sInfoFiltered": "数据表中共为 _MAX_ 条记录",
	                    "sSearch": "搜索",
	                    "oPaginate": {
	                        "sFirst": "首页",
	                        "sPrevious": "上一页",
	                        "sNext": "下一页",
	                        "sLast": "末页"
	                    }
	             }
			});
		});
		
		function add() {
			var data = $("#formdata").serialize() ;
			console.info(data) ;
			$.get("${ctx}/admin/sys/user/add", data, function(result){
				console.info(result) ;
			});
		}
		</script>
	</head>
	<body>
		<h1>用户管理</h1>
			<form id="formdata">
				用户名:<input type="text" name="username"><br>
				搜索：<input type="text" name="sSearch"><br>
				密码：<input type="text" name="password"><br>
				<input type="button" value="提交" onclick="add();">
			</form>
		<hr><br>
		
		<table id="dataTable" cellspacing="0" width="100%">
			<thead>
				<tr>
					<th>编号</th>
					<th>用户名</th>
					<th>密码</th>
					<th>密码种子</th>
					<th>手机号码</th>
					<th>邮箱地址</th>
					<th>状态</th>
					<th>日期</th>
				</tr>
			</thead>
		</table>
		
	</body>
</html>

